# -*- coding: utf-8 -*-
from unittest import TestCase


class UnitTest(TestCase):
    def test_email_logger_handler(self):
        from logger import logger

        logger.info('这个应该收不到')
        logger.fatal('出错了，速速来救命')

    def test_send_mail(self):
        from email_operation import operation

        operation.send('zhouh@waycloud.net', '测试一下', '23334123')

    def test_get_domain_id(self):
        from dnspod_operation import operation as dns_pod

        domain_id = dns_pod.get_domain_id()
        print(domain_id)

    def test_get_vpn_record(self):
        from dnspod_operation import operation as dns_pod

        k = dns_pod.get_vpn_record_id()
        print(k)

    def test_get_vpn_record_ip(self):
        from dnspod_operation import operation as dns_pod

        k = dns_pod.get_vpn_record_ip()
        print(k)

    def test_update_vpn_record(self):
        from dnspod_operation import operation as dns_pod

        ip = '61.131.75.41'
        dns_pod.update_vpn_record(ip)
